<template>
  <div>
    <top-banner
      :bannerConfig="bannerConfig"
      :titleConfig="titleConfig"
    ></top-banner>
    <div class="zt box ">
      <open-module><h1 slot="title" class="topTitle">留言板</h1></open-module>
      <board class="message" :news="message"></board>
    </div>
    <footr></footr>
  </div>
</template>
<script>
import OpenModule from 'components/content/openModule/OpenModule.vue';
import TopBanner from "components/content/topBanner/TopBanner.vue";
import Board from 'components/common/message/board.vue';

import addWebMessage from "netWork/addWebMessage"
import getMyTitle from "netWork/MyTitle"
import Footr from '../../components/content/footr/Footr.vue';
export default {
  components: { TopBanner, OpenModule,Board,Footr },
  name: "webMessage",
  data() {
    return {
      //banner设置
      bannerConfig: {
        hei: "500px",
      },
      //标题展示设置
      titleConfig: {
        but: false,
        contact: false,
      },
      message:[]
    };
  },
  created() {
    getMyTitle().then(res=>{
      this.message = JSON.parse(res.data[0].webmessage)
    })
  },
  mounted() {
    this.$bus.$on("goMessage",news=>{
      addWebMessage(news)
    })
    
  },
};
</script>
<style scoped>
.box{
  position: relative;
  margin-top:-60px ;
  margin-bottom:20px ;
}
.topTitle{
  padding: 10px 0;
}
.message{
  margin-top:20px ;
}
</style>